home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / MacWT 0.9 / wt Source / list.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-10-10  |  1.2 KB  |  44 lines  |  [TEXT/CWIE]

  1. /*
  2. **  MacWT -- a 3d game engine for the Macintosh
  3. **  © 1995, Bill Hayden and Nikol Software
  4. **  Free for non-commercial use - address questions to the e-mail address below
  5. **
  6. **  Mail:           afn28988@freenet.ufl.edu (Bill Hayden)
  7. **    MacWT FTP site: ftp.circa.ufl.edu/pub/software/ufmug/mirrors/LocalSW/Hayden/
  8. **  WWW Page:       http://grove.ufl.edu:80/~nikolsw
  9. **
  10. **    All of the above addresses are due to changes sometime in 1996, so stay tuned
  11. **
  12. **  based on wt, by Chris Laurel
  13. **
  14. **  This program is distributed in the hope that it will be useful,
  15. **  but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  17. */
  18.  
  19.  
  20. #ifndef _LIST_H_
  21. #define _LIST_H_
  22.  
  23. typedef struct List_s {
  24.      void *node;
  25.      struct List_s *next;
  26. } List;
  27.  
  28. #define LIST_NODE(l, type) ((type) (l)->next->node)
  29.  
  30.  
  31. typedef Boolean Scan_list_function(List *l, void *data);
  32.  
  33. extern List *new_list(void);
  34. extern void add_node(List *l, void *node);
  35. extern void delete_node(List *l);
  36. extern void remove_node(List *l);
  37. extern void delete_list(List *l);
  38.  
  39. extern List *scan_list(List *l, void *data, Scan_list_function *func);
  40. extern Boolean find_node(List *l, void *data);
  41.  
  42. #endif /* _LIST_H_ */
  43.  
  44.